enum Direction{
  TOP = 'top',
  LEFT = 'left',
  RIGHT = 'right',
  BOTTOM = 'bottom',
}

function move(direction: Direction){
  if(direction === 'top'){
    console.log('向上')
  }else if(direction === 'left'){
    console.log('向左')
  }else if(direction === 'right'){
    console.log('向右')
  }else if(direction === 'bottom'){
    console.log('向下')
  }
}

move(Direction.TOP)
move(Direction.LEFT)
move(Direction.RIGHT)
move(Direction.BOTTOM)
